package com.yunsc.order.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.yunsc.common.validator.ValidationGroups;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @version: 1.0
 * @Author: adan
 * @description: 订单评论DTO
 * @date: 2024-05-21 23:07
 */
@Data
public class OrderCommentDTO {
    @NotNull(message = "订单ID不能为空", groups = {ValidationGroups.Update.class})
    @JsonProperty("orderId")
    private Integer orderId;
    private List<OrderCommentForm> form;

    @Data
    public static class OrderCommentForm {
        private Integer goodsId;
        @NotNull(message = "订单商品ID不能为空", groups = {ValidationGroups.Update.class})
        private Integer orderGoodsId;
        private Integer score;
        private String content;
        @JsonProperty("imageList")
        private List<ImageList> imageList;
        private List<Integer> uploaded;
    }

    @Data
    public static class ImageList {
        private String path;
        private Integer size;
    }
}
